angular.module('faApp')
  .service('linkService', [ 'ajaxService',function (ajaxService) {

    this.linkList = function (cfg) {
      return ajaxService.jsonp(ajaxService.getApiUri("LINK_LIST"),cfg || {});
    };  
    
    this.linkAdd = function (ad) {
      return ajaxService.jsonp(ajaxService.getApiUri("LINK_ADD"),ad || {});
    };  

    this.linkEdit = function (ad) {
      return ajaxService.jsonp(ajaxService.getApiUri("LINK_EDIT"),ad || {});
    };  

    this.linkQuery = function (id) {
      return ajaxService.jsonp(ajaxService.getApiUri("LINK_QUERY") + id + ".shtml");
    };  

    this.linkStart = function (cfg) {
      return ajaxService.jsonp(ajaxService.getApiUri("LINK_EDIT"),cfg || {});
    };  

    this.linkStop = function (cfg) {
      return ajaxService.jsonp(ajaxService.getApiUri("LINK_EDIT"),cfg || {});
    };   

    this.linkDelete = function (cfg) {
      return ajaxService.jsonp(ajaxService.getApiUri("LINK_DELETE"),cfg || {});
    };  
}]);
 



